/**
 * 
 */
package com.nh.orderEntity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.nh.entity.BaseEntity;

/**
 * 项目名称：OrderingMiddleware
 * 
 * 类名称：VegetablesEntity
 * 
 * 类描述：菜名称
 * 
 * 创建人：李兴建
 * 
 * E-mail:lxj08193@163.com
 * 
 * 创建时间：2013-1-8 上午10:51:38
 * 
 * 修改人：李兴建
 * 
 * 修改时间：2013-1-8 上午10:51:38
 * 
 * 修改备注：
 * 
 * @version
 */
@Entity
@Table(name = "c_c")
public class VegetablesEntity extends BaseEntity {
	private int cid;// 菜id
	private String cid2;
	private String code;// 菜编号
	private String title;// 菜名称
	private String chinese;// 菜拼音码
	private int typeId;// 类别id
	private String typeId2;
	private BigDecimal price; // 价格
	private String unit;// 单位
	private String price2;
	private byte[] img;
	private String cpjs;//菜品介绍

	/**
	 * @return the typeId2
	 */
	@Transient
	public String getTypeId2() {
		return typeId+"";
	}

	/**
	 * @param typeId2 the typeId2 to set
	 */
	public void setTypeId2(String typeId2) {
		this.typeId2 = typeId2;
	}

	/**
	 * @return the cid2
	 */
	@Transient
	public String getCid2() {
		return cid+"";
	}

	/**
	 * @param cid2 the cid2 to set
	 */
	public void setCid2(String cid2) {
		this.cid2 = cid2;
	}

	/**
	 * @return the code
	 */
	@Column(name="菜编号")
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the title
	 */
	@Column(name="菜名称")
	public String getTitle() {
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the chinese
	 */
	@Column(name="菜拼音码")
	public String getChinese() {
		return chinese;
	}

	/**
	 * @param chinese
	 *            the chinese to set
	 */
	public void setChinese(String chinese) {
		this.chinese = chinese;
	}

	/**
	 * @return the typeId
	 */
	@Column(name="类别id")
	public int getTypeId() {
		return typeId;
	}

	/**
	 * @param typeId
	 *            the typeId to set
	 */
	public void setTypeId(int typeId) {
		this.typeId = typeId;
	}

	/**
	 * @return the unit
	 */
	@Column(name="单位")
	public String getUnit() {
		return unit;
	}

	/**
	 * @param unit
	 *            the unit to set
	 */
	public void setUnit(String unit) {
		this.unit = unit;
	}

	/**
	 * @return the price
	 */
	@Column(name="价格")
	public BigDecimal getPrice() {
		return price;
	}

	/**
	 * @param price
	 *            the price to set
	 */
	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	/**
	 * @return the price2
	 */
	@Transient
	public String getPrice2() {
		return price + "";
	}

	/**
	 * @param price2
	 *            the price2 to set
	 */
	public void setPrice2(String price2) {
		this.price2 = price2;
	}

	/**
	 * @return the cid
	 */
	
	@Id	
	@Column(name = "菜id")
	@GeneratedValue(strategy = GenerationType.IDENTITY, generator = "XNKY_BASE_IDENTITY")
	@SequenceGenerator(name = "XNKY_BASE_IDENTITY", initialValue = 1000000, allocationSize = 1)
	public int getCid() {
		return cid;
	}

	/**
	 * @param cid the cid to set
	 */
	public void setCid(int cid) {
		this.cid = cid;
	}

	/**
	 * @return the img
	 */
	public byte[] getImg() {
		return img;
	}

	/**
	 * @param img the img to set
	 */
	public void setImg(byte[] img) {
		this.img = img;
	}

	/**
	 * @return the cpjs
	 */
	public String getCpjs() {
		return cpjs;
	}

	/**
	 * @param cpjs the cpjs to set
	 */
	public void setCpjs(String cpjs) {
		this.cpjs = cpjs;
	}


}
